<template>
  <div>
    <sweet-scrollbar height="800px">

      <sweetAutocomplete />

      <sweet-input v-model="input" placeholder="Please input" />

      <sweet-slider v-model="slider" :marks="marks"> </sweet-slider>

      <sweet-input
        placeholder="搜索"
        clearable
        class="input-search"
        v-model="search">
          <template #prefix><i class="sweetui-icon-search-l"></i></template>
      </sweet-input>
      <sweet-rate v-model="rate" />
      <br />

      <sweet-select v-model="select" class="ml-12" size="large" :max-height="200">
        <sweet-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
      </sweet-select>
      <sweetSelectTree />
      <sweet-select-v2 v-model="select" :options="options" placeholder="Please select" />
      <sweetCustomSelect />
      <sweetMultiSelect />

      <sweet-checkbox-group v-model="checkedCities" :min="1" :max="2">
        <sweet-checkbox v-for="city in cities" :key="city" :label="city">{{ city }}</sweet-checkbox>
      </sweet-checkbox-group>
      <sweet-radio-group v-model="radio">
        <sweet-radio :label="3">Option A</sweet-radio>
        <sweet-radio :label="6">Option B</sweet-radio>
        <sweet-radio :label="9">Option C</sweet-radio>
      </sweet-radio-group>
      <br />
      <sweet-input-number v-model="num" :min="1" :max="100"/>
      <br />
      <sweet-switch v-model="switchValue" class="mb-2" active-text="Pay by month" inactive-text="Pay by year" />
      <br />
      <sweetUpload />
      <br />
      <sweetDatePicker />
      <sweet-time-picker v-model="timePickerValue" placeholder="Arbitrary time" />
      <sweet-time-select v-model="timeSelectValue" start="08:30" step="00:15" end="18:30" placeholder="Select time" />

      <sweetDropdown />

      <sweetTransfer />

      <sweet-color-picker v-model="color1" show-alpha />
      <br />

      <sweet-cascader v-model="cascaderValue" :options="cascaderOptions" />
      <sweet-cascader v-model="cascaderValue" :options="cascaderOptions" :props="cascaderProps" />

      <sweetForm />
      <h2>隔开</h2>
      <sweetFormValidate />
      <h2>隔开</h2>
      <sweetTimeRange />


    </sweet-scrollbar>
  </div>
</template>
<script>
import sweetAutocomplete from './recording-components/sweet-autocomplete.vue';
import sweetSelectTree from './recording-components/sweet-select-tree.vue';
import sweetCustomSelect from './recording-components/sweet-custom-select.vue';
import sweetMultiSelect from './recording-components/sweet-multi-select.vue';
import sweetUpload from './recording-components/sweet-upload.vue';
import sweetDatePicker from './recording-components/sweet-date-picker.vue';
import sweetDropdown from './recording-components/sweet-dropdown.vue';
import sweetTransfer from './recording-components/sweet-transfer.vue';
import sweetForm from './recording-components/sweet-form.vue';
import sweetFormValidate from './recording-components/sweet-form-validate.vue';
import sweetTimeRange from './recording-components/sweet-time-range.vue';

export default {
  components: { sweetAutocomplete, sweetSelectTree, sweetCustomSelect, sweetMultiSelect, sweetUpload, sweetDatePicker, sweetDropdown, sweetTransfer, sweetForm, sweetFormValidate, sweetTimeRange },
  data() {
    return {
      input: '',
      slider: 20,
      marks: { 0: '0', 20: '20', 40: '40', 60: '60', 80: '80', 100: '100', },
      search: '',
      rate: null,
      select: 'a',
      options: [
        {label: 'a', value: 'a'},
        {label: 'b', value: 'b'},
      ],
      checkedCities: ['Shanghai', 'Beijing'],
      cities: ['Shanghai', 'Beijing', 'Guangzhou', 'Shenzhen'],
      radio: 6,
      num: 10,
      switchValue: true,
      timePickerValue: null,
      timeSelectValue: null,
      color1: '#409eff',
      cascaderValue: '',
      cascaderProps: {
        expandTrigger: 'hover',
      },
      cascaderOptions: [
        {
          value: 'guide',
          label: 'Guide',
          children: [
            {
              value: 'disciplines',
              label: 'Disciplines',
              children: [
                {
                  value: 'consistency',
                  label: 'Consistency'
                },
                {
                  value: 'feedback',
                  label: 'Feedback'
                },
                {
                  value: 'efficiency',
                  label: 'Efficiency'
                },
                {
                  value: 'controllability',
                  label: 'Controllability'
                }
              ]
            },
            {
              value: 'navigation',
              label: 'Navigation',
              children: [
                {
                  value: 'side nav',
                  label: 'Side Navigation'
                },
                {
                  value: 'top nav',
                  label: 'Top Navigation'
                }
              ]
            }
          ]
        },
        {
          value: 'component',
          label: 'Component',
          children: [
            {
              value: 'basic',
              label: 'Basic',
              children: [
                {
                  value: 'layout',
                  label: 'Layout'
                },
                {
                  value: 'color',
                  label: 'Color'
                },
                {
                  value: 'typography',
                  label: 'Typography'
                },
                {
                  value: 'icon',
                  label: 'Icon'
                },
                {
                  value: 'button',
                  label: 'Button'
                }
              ]
            },
            {
              value: 'form',
              label: 'Form',
              children: [
                {
                  value: 'radio',
                  label: 'Radio'
                },
                {
                  value: 'checkbox',
                  label: 'Checkbox'
                },
                {
                  value: 'input',
                  label: 'Input'
                },
                {
                  value: 'input-number',
                  label: 'InputNumber'
                },
                {
                  value: 'select',
                  label: 'Select'
                },
                {
                  value: 'cascader',
                  label: 'Cascader'
                },
                {
                  value: 'switch',
                  label: 'Switch'
                },
                {
                  value: 'slider',
                  label: 'Slider'
                },
                {
                  value: 'time-picker',
                  label: 'TimePicker'
                },
                {
                  value: 'date-picker',
                  label: 'DatePicker'
                },
                {
                  value: 'datetime-picker',
                  label: 'DateTimePicker'
                },
                {
                  value: 'upload',
                  label: 'Upload'
                },
                {
                  value: 'rate',
                  label: 'Rate'
                },
                {
                  value: 'form',
                  label: 'Form'
                }
              ]
            },
            {
              value: 'data',
              label: 'Data',
              children: [
                {
                  value: 'table',
                  label: 'Table'
                },
                {
                  value: 'tag',
                  label: 'Tag'
                },
                {
                  value: 'progress',
                  label: 'Progress'
                },
                {
                  value: 'tree',
                  label: 'Tree'
                },
                {
                  value: 'pagination',
                  label: 'Pagination'
                },
                {
                  value: 'badge',
                  label: 'Badge'
                }
              ]
            },
            {
              value: 'notice',
              label: 'Notice',
              children: [
                {
                  value: 'alert',
                  label: 'Alert'
                },
                {
                  value: 'loading',
                  label: 'Loading'
                },
                {
                  value: 'message',
                  label: 'Message'
                },
                {
                  value: 'message-box',
                  label: 'MessageBox'
                },
                {
                  value: 'notification',
                  label: 'Notification'
                }
              ]
            },
            {
              value: 'navigation',
              label: 'Navigation',
              children: [
                {
                  value: 'menu',
                  label: 'Menu'
                },
                {
                  value: 'tabs',
                  label: 'Tabs'
                },
                {
                  value: 'breadcrumb',
                  label: 'Breadcrumb'
                },
                {
                  value: 'dropdown',
                  label: 'Dropdown'
                },
                {
                  value: 'steps',
                  label: 'Steps'
                }
              ]
            },
            {
              value: 'others',
              label: 'Others',
              children: [
                {
                  value: 'dialog',
                  label: 'Dialog'
                },
                {
                  value: 'tooltip',
                  label: 'Tooltip'
                },
                {
                  value: 'popover',
                  label: 'Popover'
                },
                {
                  value: 'card',
                  label: 'Card'
                },
                {
                  value: 'carousel',
                  label: 'Carousel'
                },
                {
                  value: 'collapse',
                  label: 'Collapse'
                }
              ]
            }
          ]
        },
        {
          value: 'resource',
          label: 'Resource',
          children: [
            {
              value: 'axure',
              label: 'Axure Components'
            },
            {
              value: 'sketch',
              label: 'Sketch Templates'
            },
            {
              value: 'docs',
              label: 'Design Documentation'
            }
          ]
        }
      ],
    }
  },
}
</script>
